<%@ include file="IsAdmin.jsp"%><%@ page import="java.util.*,database.DBCon" %>
<%
try{
           DBCon db = new DBCon();
            Enumeration en = request.getParameterNames();
            while(en.hasMoreElements())
            {
                String username = (String)en.nextElement();
                String type = request.getParameter(username);
                db.updateProfessorType(username, type);
            }
            response.sendRedirect("controlProfesor.jsp");
	    }
catch(Exception e)
{
    response.sendRedirect("../connectionFailed.jsp?"+e);
}

%>
